package com.iptv.grape.util;
import android.content.SharedPreferences;
import android.webkit.JavascriptInterface;

import org.json.JSONObject;

import static android.content.Context.MODE_PRIVATE;
// 接收第三方网页的JS 发送过来的消息
public class HyBirdWebCallBack {


    public HyBirdWebCallBack()
    {

    }

    @JavascriptInterface
    public void recvWebPlay(String jsonData)
    {
        try {
            AppLog.getCurLog().out(jsonData);
            JSONObject jsonObject = new JSONObject(jsonData);
            String tag = jsonObject.getString("tag");
            if(tag.equals("p")){

            }
            AppLog.getCurLog().out("tag = " + tag);
        }
        catch (Exception e){
            e.printStackTrace();
            AppLog.getCurLog().out("recvWebPlay 错误" + e.getMessage());
        }
    }


}
